package com.itheima;

/**
 * @Author G_Y
 * @Date 2020/6/14 9:31
 * @Description: 自定义业务异常类
 **/
public class MyBusinessException extends RuntimeException {

//    private Exception e;


    private EResultCode eResultCode;
    public MyBusinessException(EResultCode eResultCode){
        this.eResultCode = eResultCode;
    }

    public EResultCode geteResultCode() {
        return eResultCode;
    }
    public static void throwBE(EResultCode eResultCode) {
        throw new MyBusinessException(eResultCode);
    }
    //    public MyBusinessException(Exception e, EResultCode eResultCode) {
//        this.e = e;
//        this.eResultCode = eResultCode;
//    }
}
